<script type="text/javascript" src="<?=JS_PATH?>/cargas/cargas.js"></script>
<!-- Top line begins -->
<div id="top">
    <div class="wrapper">
        <a href="index.html" title="" class="logo"><img src="<?=IMG_PATH?>/iridium.png" width=120  alt="www.iridium.com" /></a>
        
        <!-- Right top nav -->
        <div class="topNav">
            <ul class="userNav">
                <li><a title="" class="search"> </a></li>
                <li><a href="#" title="" class="settings"> </a></li>
                <li><a href="index.php/login/logout" title="" class="logout"> </a></li>
                <li class="showTabletP"><a href="#" title="" class="sidebar"> </a></li>
            </ul>
            
            <a title="" class="iButton"> </a>
            <a title="" class="iTop"> </a>
            <div class="topSearch">
                <div class="topDropArrow"> </div>
                <form action="">
                    <input type="text" placeholder="search..." name="topSearch" />
                    <input type="submit" value="" />
                </form>
            </div>
        </div>
        
        <!-- Responsive nav -->
        <ul class="altMenu">
            <li><a href="index.html">Painel Principal</a></li>
            <li><a href="ui.html" title="" class="exp">UI elements</a>
                <ul>
                    <li><a href="ui.html">General elements</a></li>
                    <li><a href="ui_icons.html">Icons</a></li>
                    <li><a href="ui_buttons.html">Button sets</a></li>
                    <li><a href="ui_grid.html">Grid</a></li>
                    <li><a href="ui_custom.html">Custom elements</a></li>
                    <li><a href="ui_experimental.html">Experimental</a></li>
                </ul>
            </li>
            <li><a href="forms.html" title="" class="exp" id="current">Forms stuff</a>
                <ul>
                    <li><a href="forms.html" class="active">Inputs &amp; elements</a></li>
                    <li><a href="form_validation.html">Validation</a></li>
                    <li><a href="form_editor.html">File uploads &amp; editor</a></li>
                    <li><a href="form_wizards.html">Form wizards</a></li>
                </ul>
            </li>
            <li><a href="messages.html" title="">Messages</a></li>
            <li><a href="statistics.html" title="">Statistics</a></li>
            <li><a href="tables.html" title="" class="exp">Tables</a>
                <ul>
                    <li><a href="tables.html">Standard tables</a></li>
                    <li><a href="tables_dynamic.html">Dynamic tables</a></li>
                    <li><a href="tables_control.html">Tables with control</a></li>
                    <li><a href="tables_sortable.html">Sortable &amp; resizable</a></li>
                </ul>
            </li>
            <li><a href="other_calendar.html" title="" class="exp">Other pages</a>
                <ul>
                    <li><a href="other_calendar.html">Calendar</a></li>
                    <li><a href="other_gallery.html">Images gallery</a></li>
                    <li><a href="other_file_manager.html">File manager</a></li>
                    <li><a href="other_404.html">Sample error page</a></li>
                    <li><a href="other_typography.html">Typography</a></li>
                </ul>
            </li>
        </ul>
        
        <div class="clear"></div>
    </div>
</div>
<!-- Top line ends -->
<!-- Sidebar begins -->
<div id="sidebar">
    <div class="mainNav">
        <div class="user">
            <a title="" class="leftUserDrop"><img src="<?=IMG_PATH?>/user1" alt="user image" /><span></span></a><span></span><strong style="color: #fff">Fulano de Tal</strong></span>
            <ul class="leftUser">
                <li><a href="index.php/request" title="" class="sMessages">Open Requests</a></li>
                <li><a href="index.php/settingsController" title="" class="sSettings">Settings</a></li>
                <li><a href="index.php/login/logout" title="" class="sLogout">Logout</a></li>
            </ul>
        </div>
        
        <!-- Responsive nav -->
        <div class="altNav">
            <div class="userSearch">
                <form action="">
                    <input type="text" placeholder="search..." name="userSearch" />
                    <input type="submit" value="" />
                </form>
           </div>
            
            <!-- User nav -->
            <ul class="userNav">
                <li><a href="#" title="" class="messages"></a></li>
                <li><a href="#" title="" class="settings"></a></li>
                <li><a href="index.php/login/logout" title="" class="logout"></a></li>
            </ul>
        </div>
        
        <!-- Main nav -->
        <ul class="nav">
            <li><a href="index.php/request" title=""><img src="<?=IMG_PATH?>/icons/mainnav/dashboard.png" alt="" /><span>Dashboard</span></a></li>
            <li><a href="index.php/request/newRequest" title="" ><img src="<?=IMG_PATH?>/icons/mainnav/ui.png" alt="" /><span>New Request</span></a></li>
            <li><a title=""><img src="<?=IMG_PATH?>/icons/mainnav/forms.png" alt="" /><span>Reports</span></a></li>
            <li><a class="active"><img src="<?=IMG_PATH?>/icons/light/icon-settings2.png" width="24" height="21" alt="" /><span>Settings</span></a></li> </li>
        </ul>
    </div>  
  
    <!-- Secondary nav -->
    <div class="secNav">
        <div class="secWrapper">
            <div class="secTop">
                <div class="balance">
                    <div class="balInfo">Requests Today:<span><?echo date('F d Y')?></span></div>
                    <div class="balAmount"><span></span></div>
                </div>
                <a href="#" class="triangle-blue"></a>
            </div>
            
            <!-- Tabs container -->
            <div id="tab-container" class="tab-container">
                <ul class="iconsLine ic2 etabs">
                    <li><a href="#general" title=""><span class="icos-fullscreen"></span></a></li>
                    <li><a href="#alt1" title=""><span class="icos-user"></span></a></li>
                </ul>
                
                
                <div id="general">

                </div>
                
                <div id="alt1">
                    <div class="divider"><span></span></div> 
                    <!-- Sidebar chart -->
                    <div class="numStats">
                        <ul>
                          <li><a href="#" title=""></a><span>Requests</span></li>
                          <li><a href="#" title=""></a><span>Pending</span></li>
                          <li class="last"><a href="#" title=""></a><span>Closed</span></li>
                        </ul>
                        <div class="clear"></div>
                    </div>
                </div>
                

            </div>
            
            <div class="divider"><span></span></div>
            
            <!-- Sidebar datepicker -->
            <div class="sideWidget">
                <div class="inlinedate"></div>
            </div>
            
            <div class="divider"><span></span></div>
            

            
       </div> 
       <div class="clear"></div>
   </div>
</div>
<!-- Sidebar ends -->

<!-- Content begins -->
<div id="content">
    <div class="contentTop">
        <span class="pageTitle"><span id="detailsIcon" class="icos-view"></span><span id="detailsTitle">Settings</span></span>
        <ul class="quickStats">
            <li>
                <a href="" class="blueImg"><img src="<?=IMG_PATH?>/icons/quickstats/user.png" alt="" /></a>
                <div class="floatR"><strong class="blue">1234</strong><span>NOIVs</span></div>
            </li>
            <li>
                <a href="" class="greenImg"><img src="<?=IMG_PATH?>/icons/quickstats/user.png" alt="" /></a>
                <div class="floatR"><strong class="green">1224</strong><span>Approved</span></div>
            </li>
            <li>
                <a href="" class="redImg" ><img src="<?=IMG_PATH?>/icons/quickstats/user.png" alt="" /></a>
                <div class="floatR"><strong class="red">10</strong><span>Pending</span></div>
            </li>
        </ul>
        <div class="clear"></div>
    </div>

    <!-- Breadcrumbs line -->
    <div class="breadLine">
        <div class="bc">
            <ul id="breadcrumbs" class="breadcrumbs">
                <li><a href='index.php/request'>Painel Principal</a></li>
                <li><a>Configurações</a></li>
            </ul>
        </div>
    </div>    
   
    <!-- Main content -->
<div class="wrapper">
    <form id="formCargas" action="index.php/settingsController/saveSettings" method="psot" class="main">
            <fieldset>
                <div class="widget">
                    <div class="whead fluid">
                        <h6>Ultimas cargas</h6>
                        <a title="Adcionar nova carga" onclick="nova_carga()" class="bLightBlue buttonH">+</a>
                    </div>
                    <div class="formRow">
                        <table id="ultimos_acessos" cellpadding="0" cellspacing="0" width="100%" class="dTable">
                            <thead>
                                <tr>
                                    <td>N°</td>
                                    <td>Data</td>
                                    <td>L Carregamento</td>
                                    <td>M Carregados</td>
                                    <td>L Entrega</td>
                                    <td>Peso</td>
                                    <td>Metros</td>
                                </tr>
                            </thead>
                            <tbody>
                                <?
                                    foreach ($retorno as $linha) {
                                        ?>
                                        <tr>
                                            <td><?=$linha->numero_carregamento?></td>
                                            <td><?=$linha->data?></td>
                                       
                                        </tr>
                                        <?
                                    }
                                ?>
                            </tbody>
                            </table>
                    </div>
                    <div class="clear"></div>
                </div>
            </fieldset>
        <fieldset id="novaCarga" style="display: none">
                <div class="widget">
                    <div class="whead fluid">
                        <h6>Nova Carga</h6>
                    </div>
                    <div class="formRow fluid">
                       <div class="grid2"><label>N° Carregamento:</label></div>
                       <div class="grid2"><input type="text" name="nCarregamento"/></div>
                       <div class="grid2"><label>Data:</label></div>
                       <div class="grid2"><input type="text" name="data" id="campoData"/></div>  
                    </div>
                    <div class="formRow fluid">
                       <div class="grid2"><label>L Carregamento:</label></div>
                       <div class="grid2"><input type="text" name="lCarregamento"/></div>
                       <div class="grid2"><label>M Carregados:</label></div>
                       <div class="grid2"><input type="text" name="mCarregados" /></div>  
                    </div>
                    <div class="formRow fluid">
                       <div class="grid2"><label>L entrada:</label></div>
                       <div class="grid2"><input type="text" name="lEntrada"/></div>
                       <div class="grid2"><label>Peso:</label></div>
                       <div class="grid1"><input type="text" name="peso"/></div>
                       <div class="grid2"><label>Metros:</label></div>
                       <div class="grid1"><input type="text" name="metros"/></div>
                    </div>
                    <div class="formRow" id="settings-saveButton">
                        <div class="grid3"><input type="button" class="buttonS bLightBlue" value="Save" onclick="salvar_carga()"></div>
                    </div>
                    <div class="clear"></div>
                 </div>
            </fieldset>
    </form>
    </div>
    <div id="dialog"></div>
